<template>
  <div class="gl_contentBox gl_heightFull">
    <div class="change_admin changeSuper">
      <el-form ref="ChangeSuperTubeVO" class="gl_form_mini" :model="ChangeSuperTubeVO" :rules="ChangeSuperTubeVO_Rules" label-width="80px">
        <el-form-item label="账号" prop="selectName">
          <el-input v-model="ChangeSuperTubeVO.selectName" size="mini" style="width:260px" />
        </el-form-item>
        <el-form-item label="密码" prop="getCode">
          <div style="width:260px">
            <el-input
              :model="ChangeSuperTubeVO.getCode"
              type="text"
              size="mini"
            />
          </div>
        </el-form-item>
        <el-button type="primary" class="onSubmit" size="mini" :loading="submitLoading" @click="submitData('ChangeSuperTubeVO')">{{ $t('configuration.configurationSubmit') }}</el-button>
      </el-form>
    </div>
  </div>
</template>

<script>
import { ChangeSuperTubeVO } from '@/lib/form/configuration';
import { ChangeSuperTubeVO_Rules } from '@/lib/validate/configuration/index.js';

export default {
  name: 'ChangeSuper',
  data() {
    return {
      ChangeSuperTubeVO: new ChangeSuperTubeVO(),
      ChangeSuperTubeVO_Rules: new ChangeSuperTubeVO_Rules(),
      submitLoading: false
    };
  },
  methods: {
    // 提交数据
    submitData(formData) {
      this.submitLoading = true;
      this.$refs[formData].validate((valid) => {
        if (valid) {
          this.submitLoading = false;
          console.log(this.ChangeSuperTubeVO);
        } else {
          this.submitLoading = false;
          return false;
        }
        console.log(valid);
      });
    }
  }
};
</script>

<style scoped>
.getCode{
  position: absolute;
  margin-left:10px;
  width:110px;
}
.onSubmit{
  width:260px;
  margin-left:80px;
}
</style>

